/**
 * 
 */
package com.jquery.ui.dictionary;

/**
 * @author linyajun
 * 
 * @date	2013-9-25
 * @description   
 */
public enum IDlgTypeEnum {

		common("common"),confirm("confirm"),error("error"),alert("alert"),info("info"),stop("stop"),
		question("question"),iframe("iframe");

	private String type;
	
	private IDlgTypeEnum(String type){
		this.type=type;
		
		
	}
	
	public static IDlgTypeEnum parseType(String type){
		if (confirm.getType().equals(type)) {
			
			return confirm;
		}else if (error.getType().equals(type)) {
			return error;
		}else if (alert.getType().equals(type)) {
			return alert;
		}else if (info.getType().equals(type)) {
			return info;
		}else if (stop.getType().equals(type)) {
			return stop;
		}else if (question.getType().equals(type)) {
			return question;
		}else if (iframe.getType().equals(type)) {
			return iframe;
		}
		return common;
		
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}
	
	
}
